﻿@model IList<BestsellersReportLineModel>
@using Telerik.Web.Mvc.UI
<table class="adminContent">
    <tr>
        <td>
            @(Html.Telerik().Grid<BestsellersReportLineModel>()
                        .Name("bestsellers-byquantity-grid")
                        .Columns(columns =>
                        {
                            columns.Bound(x => x.ProductVariantFullName);
                            columns.Bound(x => x.TotalQuantity);
                            columns.Bound(x => x.TotalAmount);
                            columns.Bound(x => x.ProductVariantId)
                                .Template(x => Html.ActionLink(@T("Admin.Common.View").Text, "Edit", "ProductVariant", new { id = x.ProductVariantId }, new { }))
                                .ClientTemplate("<a href=\""+ @Url.Content("~/Admin/ProductVariant/Edit/") + "<#= ProductVariantId #>\">" + T("Admin.Common.View").Text + "</a>")
                                .Width(50)
                                .Centered()
                                .Title(T("Admin.Common.View").Text);
                        })
                        .DataBinding(dataBinding => dataBinding.Ajax().Select("BestsellersBriefReportByQuantityList", "Order"))
                        .EnableCustomBinding(true))
        </td>
    </tr>
</table>
